package com.zhiliao.state.demo4;

public class OrderStateContext {
    private OrderState orderState;

    public OrderStateContext() {
        orderState = new InitOrderState(0);
    }

    public OrderState getOrderState() {
        return orderState;
    }

    public void setOrderState(OrderState orderState) {
        this.orderState = orderState;
    }

    public void handleState() {
        orderState.setContext(this);
        orderState.changeState();
    }
}
